/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


$("document").ready(function(){
    $("a").tooltip({
        track: true,
        delay: 0,
        showURL: false,
        opacity: 1,
        fixPNG: true,
        showBody: " - ",
        extraClass: "pretty",
        top: -15,
        left: 5,
        bodyHandler: function(){
            var maSanPham = $(this).children("img").attr('alt');
            if (maSanPham != undefined){
                var msgTemp ;
                var sendData = "command=laySanPhamTooltip&maSanPham=" + maSanPham;
                $.ajax({
                    type: "GET",
                    url: "/WebsiteBanHang/XemDanhSachSanPhamControler",
                    data: sendData ,
                    async: false,
                    success: function(msg)
                    {
                        msgTemp = msg;
                    }
                }); //end ajax
            }

            if(msgTemp != undefined)
            {                
                return  msgTemp;
            }
            return "";

        } // end body handler
    });

});